#ifndef _SERVERENTITYMANAGER_
#define _SERVERENTITYMANAGER_

#include "../NetworkHandler.hpp"
#include "Networking/PacketHelper.hpp"
#include "Objects/Objects.hpp"
#include "../ClientCollection.hpp"
#include "Character.hpp"
#include "Player.hpp"

/** 
 * Server side implementation of EntityManager.
 * Contains all non player entities existing on the server.
 * @see ObjectManager
 * @see Entity
 */
class ServerEntityManager: public EntityManager{
protected:
	
public:
	Entity** entities;
	ServerEntityManager();

	void init();

	virtual void update(unsigned int frameTime);
	virtual Entity* createEntity(const char* name);
    
	virtual bool destroyEntity(Entity* ent);
	Entity* getEntity(uint16_t index);

	virtual void bind(lua_State* luaState);
    virtual void push(lua_State* luaState);
};

#endif